import { Controller, Get } from '@nestjs/common';
import { AuthService } from './auth.service';
import { JwtPayLoadDto } from './dto/jwt-payload.dto';

@Controller('auth')
export class AuthController {

  constructor(private readonly authService: AuthService) { }

  @Get('token')
  async createToken(jwtPayLoad: JwtPayLoadDto): Promise<any> {
    return await this.authService.createToken(jwtPayLoad);
  }

}